Skip to content

Conversation

dshafik
Copy link

@dshafik dshafik commented Nov 28, 2024

I was trying to review OpenAI requests using Telescope which captures requests made using the Laravel HTTP Client, however this integration uses Guzzle directly.

The OpenAI PHP library supports any PSR-18 compatible client, so I pulled in swisnl/laravel-psr-http-client-bridge which is a PSR-18 compatible wrapper around the Laravel HTTP Client and used that instead of Guzzle directly.

This change allows the requests to show up in Telescope as expected.

@iBotPeaches
Copy link
Collaborator

I'm a bit nervous that we move our implementation to a 3rd party wrapper package. It seems my argument is more with Laravel on why their HTTP Client isn't PSR-18 compatible. When we saw the last implementation (https://github.com/gehrisandro/laravel-http-psr18) of wrapping Laravel/HTTP it had some issues.

I wonder what we are looking at in terms of stability. Is this package basically done forever, barring a major Guzzle change? It seems PSR-18 is set and Guzzle probably isn't changing until a major.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants